from django.db import models
# django中自带的用户认证模块
from django.contrib.auth.models import AbstractUser


class Administrators(AbstractUser):
    create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    update_time = models.DateTimeField(auto_now_add=True, verbose_name="更新时间")
    avatar = models.ImageField(verbose_name='用户头像', blank=True, null=True, upload_to='avatar/', default='default.jpg')

    class Meta:
        db_table = 'Administrators'
        verbose_name = '登录使用者表'
